package com.woniu1.staticproxy;

public class StaticProxy implements UtraMan{

    @Override
    public void hit() {
        //前置方法
        preHaler();
        //目标对象方法
        UtraManImpl utraMan = new UtraManImpl();
        utraMan.hit();
        //后置方法
        lastHaler();
    }
    public void preHaler(){
        System.out.println("我是贝穆斯坦");
    }
    public void lastHaler(){
        System.out.println("贝穆斯坦被打败了");
    }

    public static void main(String[] args) {
        StaticProxy staticProxy = new StaticProxy();
        staticProxy.hit();
    }
}
